package com.draemoncode.weixindb.repository;


import com.draemoncode.weixindb.domain.B_Calculate_Env;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface B_Calculate_EnvRepository extends JpaRepository<B_Calculate_Env, Integer>{
    @Query("from B_Calculate_Env where calculate_code_id=?1")
    public List<B_Calculate_Env> findByCalculateCode(Integer calculateId);
    @Query("from B_Calculate_Env where calculate_code_id=?1 and calculate_env_key=?2 and id!=?3")
    public B_Calculate_Env findByCalculateCodeAndKeyAndId(Integer calculateId, String key, Integer id);
    @Query("from B_Calculate_Env where calculate_code_id=?1 and calculate_env_key=?2")
    public B_Calculate_Env findByCalculateCodeAndKey(Integer calculateId, String key);
}
